package com.itheima.testService;

import com.itheima.domain.User;
import com.itheima.service.UserServiceImpl;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;

public class JaxRsServerDemo {
    /**
     * 以下代码不要记  最后整合 spring
     * @param args
     */
    public static void main(String[] args) {
        //1.创建工厂
        JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
        //2.配置实体类
        factory.setResourceClasses(User.class);
        //3.配置服务实现类
        factory.setServiceBean(new UserServiceImpl());
        //4.配置请求路径
        factory.setAddress("http://localhost:8080/"); //http://localhost:8080
        //5.发布服务
        factory.create();
    }
}
